package com.zhuhao.utils.easyexcel;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.alibaba.excel.enums.poi.VerticalAlignmentEnum;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

// @ColumnWidth作用：设置全局列宽为20
@ColumnWidth(20)
// @ContentStyle作用：设置全局内容居中
@ContentStyle(verticalAlignment = VerticalAlignmentEnum.CENTER, horizontalAlignment = HorizontalAlignmentEnum.CENTER)
@Data
@NoArgsConstructor
@AllArgsConstructor
public class User {

    // @ExcelProperty作用：设置列标题名称
    @ExcelProperty("姓名")
    private String name;
    @ExcelProperty("年龄")
    private int age;
    @ExcelProperty("身高")
    private int height;

    public User(String name, int age, int height) {
        this.name = name;
        this.age = age;
        this.height = height;
    }

    private Integer qcState;


}
